package _06线程池的使用_Callable方式;

import java.util.Random;
import java.util.concurrent.Callable;

public class MyCallable implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        String name = Thread.currentThread().getName();
        System.out.println(name+"执行了");
        Random r = new Random();
        int i = r.nextInt(10);
        return i;
    }
}
